import { http } from "@/utils/http";
import type { HttpResponse } from "types/request";
import type { AccountAggregationSchemaObject } from "@/types/account.types";

import { URL_PREFIX } from "./constants";

export const getAccountAggregation = () => {
  return http.request<HttpResponse<AccountAggregationSchemaObject>>(
    "get",
    `${URL_PREFIX}/account/aggregation`
  );
};

export const refreshAccountAggregation = () => {
  return http.request<HttpResponse<AccountAggregationSchemaObject>>(
    "post",
    `${URL_PREFIX}/account/aggregation/refresh`
  );
};
